import { useState } from'react';
import Search from './components/Search';
import Filter from './components/Filter';
import CourseList from './components/CourseList';
import './index.css';
import './App.css';

function App() {
  // 统一维护查询参数
  const [params, setParams] = useState({
    classification_id: -1,
    sort_type: -1,
    page_size: 30,
    page: 1,
    word: '跑步',
  });
  return (
    <div id="cheese-pages-app">
      <div className="search-wrp">
        <Search params={params} setParams={setParams} />
        <Filter params={params} setParams={setParams} />
        <CourseList params={params} setParams={setParams} />
      </div>
    </div>
  );
}

export default App;